export default {
    props: {},
    components: {},
    data () {
      return {
         array: [
           [ "花芽分化期",
            "现蕾至开花期",
            "春梢幼果期",
            "两次生理落果期",
            "秋梢抽发期",
            "果实膨大转色期",
            "成熟采收期",
            "幼树期",]
          ],
          array2: [
            ["晴", "多云", "阴"],
            ["24~39", "低于0", "0~5", "5~10"],
          ],
          index: 0,
          index2: [0, 0],
          date: Number(new Date()),
          dateShow: false,
          columnsShow: false,
          pickerShow: false,
      }
    },
    computed: {
      startDate() {
        return this.getDate("start");
      },
      endDate() {
        return this.getDate("end");
      },
    },
    created () {
    },
    mounted () {},
    methods: {
        getDate(type) {
            const date = new Date();
            let year = date.getFullYear();
            let month = date.getMonth() + 1;
            let day = date.getDate();
      
            if (type === "start") {
              year = year - 60;
            } else if (type === "end") {
              year = year + 2;
            }
            month = month > 9 ? month : "0" + month;
            day = day > 9 ? day : "0" + day;
            return `${year}-${month}-${day}`;
          },
          bindPickerChange: function ({indexs}) {
            console.log("picker发送选择改变，携带值为", indexs);
            this.index = indexs[0];
            this.pickerShow=false;
          },
          bindPickerChange2: function ({indexs}) {
            console.log("picker发送选择改变，携带值为", indexs);
            this.index2 = indexs;
            this.columnsShow=false;
          },
          bindDateChange: function (e) {
            this.dateShow=false;
          },
    }
  }
  